#ifndef CPP_LIST_H
#define CPP_LIST_H

#include <widget/ViewGroup.h>
#include <widget/AbsListView.h>

class ListAdapter;

//@brief 列表
//@author cvte
//@description 列表控件
class ListView : public AbsListView {
   public:
    ListView();
    virtual ~ListView();

    void setAdapter(ListAdapter& adapter);
    ListAdapter* getAdapter();
    void addView(View* view);

   protected:
    void onDraw(Canvas& canvas);

   private:
    int mViewsTotalLength; //列表中所有子view加上每个item间隔的总长度
};

#endif /* CPP_LIST_H */